package com.happyclub.pojo;

import javax.persistence.*;
import java.util.Objects;

/**
 * @author 高欢
 * @description TODO
 * @date 2019/4/4
 */
@Entity
@Table(name = "TB_TEAM_PHOTO_ALBUM_MAP", schema = "SCOTT", catalog = "")
@IdClass(TbTeamPhotoAlbumMapPK.class)
public class TbTeamPhotoAlbumMap {
    private String teamId;
    private String photoAlbumId;
    private String updateTime;
    private String createTime;

    @Id
    @Column(name = "TEAM_ID")
    public String getTeamId() {
        return teamId;
    }

    public void setTeamId(String teamId) {
        this.teamId = teamId;
    }

    @Id
    @Column(name = "PHOTO_ALBUM_ID")
    public String getPhotoAlbumId() {
        return photoAlbumId;
    }

    public void setPhotoAlbumId(String photoAlbumId) {
        this.photoAlbumId = photoAlbumId;
    }

    @Basic
    @Column(name = "UPDATE_TIME")
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "CREATE_TIME")
    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbTeamPhotoAlbumMap that = (TbTeamPhotoAlbumMap) o;
        return Objects.equals(teamId, that.teamId) &&
                Objects.equals(photoAlbumId, that.photoAlbumId) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(createTime, that.createTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(teamId, photoAlbumId, updateTime, createTime);
    }
}
